//
//  LLAboutViewController.m
//  UserUse
//
//  Created by Yiwi on 16/10/19.
//  Copyright © 2016年 CJPC. All rights reserved.
//

#import "LLAboutViewController.h"

@interface LLAboutViewController ()<UIWebViewDelegate>{
    MBProgressHUD *_hud;
}

@property(nonatomic,strong)UIWebView *webView;

@end

@implementation LLAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"关于我们";
    [self setupWebView];
}

-(void)setupWebView{
    _webView = [UIWebView new];
    [self.view addSubview:_webView];
    NSURL *url = [NSURL URLWithString:@"http://www.usherpower.com:8080/CJPC/page/about_us.html"];
    _webView.scalesPageToFit = YES;
    _webView.delegate = self;
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [self.webView loadRequest:request];
    
    [_webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.mas_equalTo(0);
    }];
    [MBProgressHUD showTheMessage:@"加载中..." with:_webView];
}

//网页加载完成
- (void)webViewDidFinishLoad:(UIWebView *)webView{
    [MBProgressHUD hideHUDForView:_webView animated:NO];
}

@end
